package com.gywj.race.entity;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class OrdersExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected int pageNum = -1;

    protected int pageSize = -1;

    public OrdersExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public OrdersExample setPageNum(int pageNum) {
        this.pageNum=pageNum;
        return (OrdersExample) this;
    }

    public int getPageNum() {
        return pageNum;
    }

    public OrdersExample setPageSize(int pageSize) {
        this.pageSize=pageSize;
        return (OrdersExample) this;
    }

    public int getPageSize() {
        return pageSize;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andPibIdIsNull() {
            addCriterion("pib_id is null");
            return (Criteria) this;
        }

        public Criteria andPibIdIsNotNull() {
            addCriterion("pib_id is not null");
            return (Criteria) this;
        }

        public Criteria andPibIdEqualTo(Integer value) {
            addCriterion("pib_id =", value, "pibId");
            return (Criteria) this;
        }

        public Criteria andPibIdNotEqualTo(Integer value) {
            addCriterion("pib_id <>", value, "pibId");
            return (Criteria) this;
        }

        public Criteria andPibIdGreaterThan(Integer value) {
            addCriterion("pib_id >", value, "pibId");
            return (Criteria) this;
        }

        public Criteria andPibIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("pib_id >=", value, "pibId");
            return (Criteria) this;
        }

        public Criteria andPibIdLessThan(Integer value) {
            addCriterion("pib_id <", value, "pibId");
            return (Criteria) this;
        }

        public Criteria andPibIdLessThanOrEqualTo(Integer value) {
            addCriterion("pib_id <=", value, "pibId");
            return (Criteria) this;
        }

        public Criteria andPibIdIn(List<Integer> values) {
            addCriterion("pib_id in", values, "pibId");
            return (Criteria) this;
        }

        public Criteria andPibIdNotIn(List<Integer> values) {
            addCriterion("pib_id not in", values, "pibId");
            return (Criteria) this;
        }

        public Criteria andPibIdBetween(Integer value1, Integer value2) {
            addCriterion("pib_id between", value1, value2, "pibId");
            return (Criteria) this;
        }

        public Criteria andPibIdNotBetween(Integer value1, Integer value2) {
            addCriterion("pib_id not between", value1, value2, "pibId");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdIsNull() {
            addCriterion("event_price_id is null");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdIsNotNull() {
            addCriterion("event_price_id is not null");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdEqualTo(Integer value) {
            addCriterion("event_price_id =", value, "eventPriceId");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdNotEqualTo(Integer value) {
            addCriterion("event_price_id <>", value, "eventPriceId");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdGreaterThan(Integer value) {
            addCriterion("event_price_id >", value, "eventPriceId");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("event_price_id >=", value, "eventPriceId");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdLessThan(Integer value) {
            addCriterion("event_price_id <", value, "eventPriceId");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdLessThanOrEqualTo(Integer value) {
            addCriterion("event_price_id <=", value, "eventPriceId");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdIn(List<Integer> values) {
            addCriterion("event_price_id in", values, "eventPriceId");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdNotIn(List<Integer> values) {
            addCriterion("event_price_id not in", values, "eventPriceId");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdBetween(Integer value1, Integer value2) {
            addCriterion("event_price_id between", value1, value2, "eventPriceId");
            return (Criteria) this;
        }

        public Criteria andEventPriceIdNotBetween(Integer value1, Integer value2) {
            addCriterion("event_price_id not between", value1, value2, "eventPriceId");
            return (Criteria) this;
        }

        public Criteria andAmontIsNull() {
            addCriterion("amont is null");
            return (Criteria) this;
        }

        public Criteria andAmontIsNotNull() {
            addCriterion("amont is not null");
            return (Criteria) this;
        }

        public Criteria andAmontEqualTo(BigDecimal value) {
            addCriterion("amont =", value, "amont");
            return (Criteria) this;
        }

        public Criteria andAmontNotEqualTo(BigDecimal value) {
            addCriterion("amont <>", value, "amont");
            return (Criteria) this;
        }

        public Criteria andAmontGreaterThan(BigDecimal value) {
            addCriterion("amont >", value, "amont");
            return (Criteria) this;
        }

        public Criteria andAmontGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("amont >=", value, "amont");
            return (Criteria) this;
        }

        public Criteria andAmontLessThan(BigDecimal value) {
            addCriterion("amont <", value, "amont");
            return (Criteria) this;
        }

        public Criteria andAmontLessThanOrEqualTo(BigDecimal value) {
            addCriterion("amont <=", value, "amont");
            return (Criteria) this;
        }

        public Criteria andAmontIn(List<BigDecimal> values) {
            addCriterion("amont in", values, "amont");
            return (Criteria) this;
        }

        public Criteria andAmontNotIn(List<BigDecimal> values) {
            addCriterion("amont not in", values, "amont");
            return (Criteria) this;
        }

        public Criteria andAmontBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amont between", value1, value2, "amont");
            return (Criteria) this;
        }

        public Criteria andAmontNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amont not between", value1, value2, "amont");
            return (Criteria) this;
        }

        public Criteria andTradeNoIsNull() {
            addCriterion("trade_no is null");
            return (Criteria) this;
        }

        public Criteria andTradeNoIsNotNull() {
            addCriterion("trade_no is not null");
            return (Criteria) this;
        }

        public Criteria andTradeNoEqualTo(String value) {
            addCriterion("trade_no =", value, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeNoNotEqualTo(String value) {
            addCriterion("trade_no <>", value, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeNoGreaterThan(String value) {
            addCriterion("trade_no >", value, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeNoGreaterThanOrEqualTo(String value) {
            addCriterion("trade_no >=", value, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeNoLessThan(String value) {
            addCriterion("trade_no <", value, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeNoLessThanOrEqualTo(String value) {
            addCriterion("trade_no <=", value, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeNoLike(String value) {
            addCriterion("trade_no like", value, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeNoNotLike(String value) {
            addCriterion("trade_no not like", value, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeNoIn(List<String> values) {
            addCriterion("trade_no in", values, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeNoNotIn(List<String> values) {
            addCriterion("trade_no not in", values, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeNoBetween(String value1, String value2) {
            addCriterion("trade_no between", value1, value2, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeNoNotBetween(String value1, String value2) {
            addCriterion("trade_no not between", value1, value2, "tradeNo");
            return (Criteria) this;
        }

        public Criteria andTradeTypeIsNull() {
            addCriterion("trade_type is null");
            return (Criteria) this;
        }

        public Criteria andTradeTypeIsNotNull() {
            addCriterion("trade_type is not null");
            return (Criteria) this;
        }

        public Criteria andTradeTypeEqualTo(Integer value) {
            addCriterion("trade_type =", value, "tradeType");
            return (Criteria) this;
        }

        public Criteria andTradeTypeNotEqualTo(Integer value) {
            addCriterion("trade_type <>", value, "tradeType");
            return (Criteria) this;
        }

        public Criteria andTradeTypeGreaterThan(Integer value) {
            addCriterion("trade_type >", value, "tradeType");
            return (Criteria) this;
        }

        public Criteria andTradeTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("trade_type >=", value, "tradeType");
            return (Criteria) this;
        }

        public Criteria andTradeTypeLessThan(Integer value) {
            addCriterion("trade_type <", value, "tradeType");
            return (Criteria) this;
        }

        public Criteria andTradeTypeLessThanOrEqualTo(Integer value) {
            addCriterion("trade_type <=", value, "tradeType");
            return (Criteria) this;
        }

        public Criteria andTradeTypeIn(List<Integer> values) {
            addCriterion("trade_type in", values, "tradeType");
            return (Criteria) this;
        }

        public Criteria andTradeTypeNotIn(List<Integer> values) {
            addCriterion("trade_type not in", values, "tradeType");
            return (Criteria) this;
        }

        public Criteria andTradeTypeBetween(Integer value1, Integer value2) {
            addCriterion("trade_type between", value1, value2, "tradeType");
            return (Criteria) this;
        }

        public Criteria andTradeTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("trade_type not between", value1, value2, "tradeType");
            return (Criteria) this;
        }

        public Criteria andTradeTimeIsNull() {
            addCriterion("trade_time is null");
            return (Criteria) this;
        }

        public Criteria andTradeTimeIsNotNull() {
            addCriterion("trade_time is not null");
            return (Criteria) this;
        }

        public Criteria andTradeTimeEqualTo(Date value) {
            addCriterion("trade_time =", value, "tradeTime");
            return (Criteria) this;
        }

        public Criteria andTradeTimeNotEqualTo(Date value) {
            addCriterion("trade_time <>", value, "tradeTime");
            return (Criteria) this;
        }

        public Criteria andTradeTimeGreaterThan(Date value) {
            addCriterion("trade_time >", value, "tradeTime");
            return (Criteria) this;
        }

        public Criteria andTradeTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("trade_time >=", value, "tradeTime");
            return (Criteria) this;
        }

        public Criteria andTradeTimeLessThan(Date value) {
            addCriterion("trade_time <", value, "tradeTime");
            return (Criteria) this;
        }

        public Criteria andTradeTimeLessThanOrEqualTo(Date value) {
            addCriterion("trade_time <=", value, "tradeTime");
            return (Criteria) this;
        }

        public Criteria andTradeTimeIn(List<Date> values) {
            addCriterion("trade_time in", values, "tradeTime");
            return (Criteria) this;
        }

        public Criteria andTradeTimeNotIn(List<Date> values) {
            addCriterion("trade_time not in", values, "tradeTime");
            return (Criteria) this;
        }

        public Criteria andTradeTimeBetween(Date value1, Date value2) {
            addCriterion("trade_time between", value1, value2, "tradeTime");
            return (Criteria) this;
        }

        public Criteria andTradeTimeNotBetween(Date value1, Date value2) {
            addCriterion("trade_time not between", value1, value2, "tradeTime");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}